@echo off
echo 测试API连接
echo ================

echo 测试本地开发环境...
curl -X POST http://localhost:8080/api/contact ^
  -H "Content-Type: application/json" ^
  -d "{\"name\":\"测试用户\",\"email\":\"test@example.com\",\"phone\":\"13800138000\",\"message\":\"这是一条测试消息\"}"

echo.
echo.
echo 测试生产环境 HTTPS...
curl -X POST https://www.skillith.cn/api/contact ^
  -H "Content-Type: application/json" ^
  -d "{\"name\":\"测试用户\",\"email\":\"test@example.com\",\"phone\":\"13800138000\",\"message\":\"这是一条测试消息\"}"

echo.
echo.
echo 测试生产环境 HTTP (回退)...
curl -X POST http://www.skillith.cn:8080/api/contact ^
  -H "Content-Type: application/json" ^
  -d "{\"name\":\"测试用户\",\"email\":\"test@example.com\",\"phone\":\"13800138000\",\"message\":\"这是一条测试消息\"}"

echo.
echo 测试完成
pause
